module.exports = (app) => {
  const { TEXT, INTEGER, DATE } = app.Sequelize
  const Banners = app.model.define('banners', {
    id: {
      type: INTEGER(20).UNSIGNED,
      autoIncrement: true,
      primaryKey: true,
      comment: '主键id'
    },
    title: {
      type: TEXT,
      allowNull: false,
      comment: '主标题'
    },
    subtitle: {
      type: TEXT,
      allowNull: true,
      comment: '副标题'
    },
    gitee_url: {
      type: TEXT,
      allowNull: true,
      comment: 'gitee地址'
    },
    desc: {
      type: TEXT,
      allowNull: true,
      comment: '描述'
    },
    poster: {
      type: TEXT,
      allowNull: true,
      comment: '作者'
    },
    created_at: DATE,
    updated_at: DATE
  })
  return Banners
}
